﻿<base:ListboxBase x:Class="Rio.Framework.Pages.Controls.CheckboxList"
                  xmlns:base="clr-namespace:Rio.Framework.Pages.Controls.BaseClass"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                  mc:Ignorable="d"
                  xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                  x:Name="CheckBoxList"
                  d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot">
        <telerik:ItemsControl x:Name="itemsControl" ItemsSource="{Binding}">
            <telerik:ItemsControl.ItemTemplate>
                <DataTemplate>
                    <CheckBox Content="{Binding Text}" Foreground="{Binding Color}" Command="{Binding SelectedCommand, ElementName=CheckBoxList}" IsChecked="{Binding IsSelected, Mode=TwoWay}" />
                </DataTemplate>
            </telerik:ItemsControl.ItemTemplate>
        </telerik:ItemsControl>
    </Grid>
</base:ListboxBase>
